import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询所有分组及分组下的患者
export function selectGroup() {
  return request({
    url: '/message/patient/selectGroup',
    method: 'get'
  })
}

// 新建群发
export function addMessage(data) {
  return request({
    url: '/message/patient/addMessage',
    method: 'post',
    data: data
  })
}

export function selectPatient(groupId) {
  return request({
    url: '/message/patient/selectPatient/'+groupId,
    method: 'get'
  })
}

// 查询群发历史
export function selectMessageHistory() {
  return request({
    url: '/message/patient/selectMessageHistory',
    method: 'get'
  })
}

// 查询群发记录
export function selectMessage(messageContent) {
  return request({
    url: '/message/patient/selectMessage',
    method: 'get',
    params:{
      messageContent:messageContent
    }
  })
}

export function selectMessageDetails(id) {
  return request({
    url: '/message/patient/selectMessageDetails/'+id,
    method: 'get'
  })
}


